﻿using PGMHelper;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms.DataVisualization.Charting;

namespace HystereticBasic
{
    /// <summary>
    /// 全局参数
    /// </summary>
    public static class GlobalParam
    {
        /// <summary>
        /// 过滤滞回环的相对误差
        /// </summary>
        public static double FilterCyclicFactor = 0.05;

        /// <summary>
        /// 判断完整加载-卸载路径的承载力系数
        /// </summary>
        public static float LoadPathCapacityRatio = 0.1F;

        /// <summary>
        /// 合法的粘滞阻尼系数
        /// 判别环是否过小
        /// </summary>
        public static double ValidViscousDampingRatio = 1.2;

        /// <summary>
        /// 修正的包络曲线划分数
        /// </summary>
        public static int ModEnvelopeMeshNum = 1;

        /// <summary>
        /// 平滑曲线上升段划分次数
        /// </summary>
        public static int SmoothCurveMeshNum = 1;

/// <summary>
        /// MaxForce，MinForce不均存在时->
        /// 绝对值大者的阈值倍数（如0.1）为两者的下限值
        /// 避免单调加载或单向循环加载次方向少数点构成了骨架
        /// </summary>
        public static double MaxForceLimitRatio = 0.1;

        /// <summary>
        /// 判断相同位移的容差
        /// </summary>
        public static float DispTol = 1E-8F;

        /// <summary>
        /// 判断相同力的容差
        /// </summary>
        public static float ForceTol = 1E-8F;

        /// <summary>
        /// 虚拟软化点的位移倍数界限
        /// </summary>
        public static int VirtualUnloadPtDispFactor = 2;

        /// <summary>
        /// 最大承载力系数
        /// </summary>
        public static float UltimateForceFactor = 0.85F;

        /// <summary>
        /// Park系数
        /// </summary>
        public static float ParkFactor = 0.7F;
    }

    /// <summary>
    /// 正则化参数
    /// </summary>
    public static partial class HystereticRegParam
    {
        /// <summary>
        /// 骨架软化段离散点数目
        /// </summary>
        public static int NormalCurveRegPtrNum = 10;

        /// <summary>
        /// 正则化参数增量
        /// </summary>
        public static double NormalCurveRegParamDelta = 0.1;

        /// <summary>
        /// 正则化时的离散点数目
        /// </summary>
        public static int RegPrtNum = 50;
    }
}
